// AimDisplayImage.cs created with MonoDevelop
// User: draek at 2:32 P 21/11/2007
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//

using System;
using System.IO;

namespace Galaxium.Protocol.Aim
{
	public class AimDisplayImage : IDisplayImage
	{
		private ISession _session;
		private byte[] _imageBuffer;
		private string _filename = string.Empty;
		private string _checksum = string.Empty;
		
		public AimDisplayImage(ISession session)
		{
			_session = session;
		}
		
		public byte[] ImageBuffer
		{
			get { return _imageBuffer; }
			set { _imageBuffer = value; }
		}
		
		public string Filename
		{
			get { return _filename; }
			set
			{
				_filename = value;
				
				if (File.Exists(_filename))
					_imageBuffer = File.ReadAllBytes(_filename);
			}
		}
		
		public new string Checksum
		{
			get
			{
				return _checksum;
			}
			set { _checksum = value; }
		}
	}
}